package demo.mqclient;

import lombok.Data;

import java.io.IOException;

@Data
public class ConnectionFactory {

    //broker server 的 ip 地址
    private String host;

    //broker server 的端口号
    private int port;

//    //访问 broker server 的哪个虚拟主机
//    private String VirtualHostName;
//
//    private String userName;
//
//    private String password;

    public Connection newConnection() throws IOException {
        Connection connection = new Connection(host, port);
        return connection;
    }

}
